package com.nuc.impl;

/**
 * Time    : 2023/3/29 21:14
 * Author  : 王摇摆
 * FileName: Main.java
 * Software: IntelliJ IDEA 2020.2.2
 * Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
 */

public class Main {
    public void needBird(Bird bird) {
        bird.show();
    }

    public static void main(String[] args) {
        Main main = new Main();

        Sparrow sparrow = new Sparrow();
        SparrowDecorator sparrowDecorator1 = new SparrowDecorator(sparrow);
        SparrowDecorator sparrowDecorator2 = new SparrowDecorator(sparrowDecorator1);

        main.needBird(sparrow);
        main.needBird(sparrowDecorator1);
        main.needBird(sparrowDecorator2);

    }
}
